package com.deer.wms.base.system.dao.bill;


import com.deer.wms.base.system.model.bill.BillOutDetailCriteria;
import com.deer.wms.base.system.model.box.BoxItem;
import com.deer.wms.common.core.commonMapper.Mapper;
import com.deer.wms.base.system.model.bill.BillOutDetail;
import com.deer.wms.base.system.model.bill.BillOutDetailDto;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * chu库单 数据层
 * 
 * @author cai
 * @date 2019-07-15
 */
public interface BillOutDetailMapper extends Mapper<BillOutDetail>
{


	List<BillOutDetailDto> getBillOutPlanList(BillOutDetailCriteria criteria);

	int getCount();
	/**
	 * 根据BillOutDetailId删除BillOutDetail
	 *
	 */
	public void deleteBillOutDetailByBillOutDetailId(Integer billOutDetailId);

	public void deleteBillOutDetailByBillId(Integer billId);

	/**
	 *  根据billId查询BillOutDetail信息
	 *
	 * @param billId
	 * @return
	 */
	public List<BillOutDetailDto> findListByBillId(Integer billId);


	public List<BillOutDetailDto> findByBillId(Integer billId);
	/**
	 * 同步出库记录表时，手持机以单据号查询
	 * @param billNo
	 * @return
	 */
	public List<BillOutDetailDto> findListByBillNo(String billNo);
	/**
	 *   根据billNo查询BillOutDetail信息
	 * @author 李帅辰
	 * @date 18:00 2020/10/30
	 * @params billNo
	 * @return java.util.List<com.deer.wms.base.system.model.bill.BillOutDetailDto>
	 **/
	public List<BillOutDetailDto> selectBillOutDetailByBillNo(String billNo);

		/**
		 * 查询出库单物料详情
 		 * @param criteria
		 * @return
		 */
	public List<BillOutDetailDto> findItemDetails(BillOutDetailCriteria criteria);



	/**
	 * 保存BillOutDetail  出库单详情
	 *
	 * @param billOutDetail
	 */
	public int saveBillOutDetail(BillOutDetail billOutDetail);

	List<BillOutDetail> findList(BillOutDetailCriteria criteria);

	/**
	 * 修改出库实际数量
	 * @param billOutDetail
	 * @return
	 */
	int updateBillOutMasterQuantityDelivery(BillOutDetail billOutDetail);

    public Integer findItemCount(BoxItem boxItem);

	BillOutDetail findBybillOutDetailId(Integer billOutDetailId);

	BillOutDetail findByBillOutDetail(@Param("materialId") String materialId);

	List<BillOutDetail> findByBillOutDetailByCarrierId(@Param("carrierId") String carrierId);
}



















